package com.easylive.web.task;

import com.easylive.service.StatisticsInfoService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: yudaxian
 * @DateTime: 2024/12/25 15:51
 **/
@Component
public class SysTask {

    @Resource
    private StatisticsInfoService statisticsInfoService;
    /**
     * 每天0点执行一次
     */
    @Scheduled(cron = "0 0 0 * * ?")
    public void statisticData() {
        statisticsInfoService.statisticData();
    }
}
